package cn.wolfcode.demo.service;

import cn.wolfcode.demo.domain.User;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.*;

public interface IUserService extends IService<User> {
    @Select("select * from user where username=#{username}")
    User getUserByUserName(String username);
    //根据Id查询User
    @Select("select * from user where id=#{id}")
    @Results({@Result(property ="username" ,column ="username" ),
            @Result(property ="password" ,column ="password" )})
    User findUserById(String id);

}
